-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add basic glob support to Watcher module #93
base: master
Are you sure you want to change the base?
Conversation
I'd like support for |
When I said |
okay, great 😄. |
I just tried switching to this branch and I'm still having issues with emacs lock files causing the entire site to be rebuilt. That was the original problem I wanted to get addressed. Whenever I edit a file, emacs creates a lock file in the same directory with a similair format. I.E. if I start editing |
@mohkale That is not the correct glob pattern for the given filename. The correct pattern would be exclude:
- "**/*.#*.*" # matches src/foo/lorem.#bar.md
- "**/.#*.*" # matches src/foo/.#bar.md |
but... To clarify.
I don't need to account for such files, but thank you anyway.
The only difference between this pattern and the one in my config is that this one demands the file has an extension. I can't switch to this one because I've also got some shell scripts on my site for which I've ommited the extension and simply used a shebang line. # new pattern
File.fnmatch?("**/.#*.*", "src/foo/.#bar.md") #=> true
File.fnmatch?("**/.#*.*", "src/foo/.#bar") #=> false
# old pattern
File.fnmatch?("**/.#*", "src/foo/.#bar.md") #=> true
File.fnmatch?("**/.#*", "src/foo/.#bar") #=> true That said, I've added the two patterns you've shared to my config and I've still got the same issue using your branch. Here is the log output
to reiterate, my build directory does not contain a |
Thank you for the clarifications. I stand corrected.. I also see the problem with my implementation — it can only ignore existing paths that match the wildcard pattern. A new path matching the pattern will pass through undetected.. This needs more work |
well I look forward to the imminent fix. in the mean time I'll just keep using my own fork. 😄. |
If users list a glob pattern in the
exclude
config, expand the pattern and exclude the resulting set of paths.Currently limited to glob patterns involving just
*
Resolves #90
Closes #91
Closes #92
/cc @mohkale